<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.2"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:fmt="http://java.sun.com/jsp/jstl/fmt">
<jsp:directive.attribute name="selectedYear" required="true" />
<jsp:directive.attribute name="selectedMonth" required="true" />
<jsp:directive.attribute name="history" required="true" type="java.util.List" />
<jsp:directive.attribute name="url" required="true" />
	<div class="pagination pagination-centered">
		<ul>
			<c:forEach var="pair" items="${history}">
				<c:set var="year" value="${pair.left}" />
				<c:set var="month" value="${pair.right}" />
				<c:choose>
					<c:when test="${year != selectedYear || month != selectedMonth}">
						<li><a href="${url}/${year}/${month}" class="capitalized"><fmt:parseDate value="${year}/${month}" var="parsedDate" pattern="yyyy/MM" /><fmt:formatDate value="${parsedDate}" pattern="MMMM yyyy" /></a></li>
					</c:when>
					<c:otherwise>
						<li class="active"><a href="${url}/${year}/${month}" class="capitalized"><fmt:parseDate value="${year}/${month}" var="parsedDate" pattern="yyyy/MM" /><fmt:formatDate value="${parsedDate}" pattern="MMMM yyyy" /></a></li>
					</c:otherwise>
				</c:choose>
			</c:forEach>
		</ul>
	</div>
</jsp:root>